//index.js
//获取应用实例
const app = getApp()

Page({
  data:{
    size:"20px"
  },
  radioChange:function(e){
    this.setData({
      size:e.detail.value
    })
  },
  checkboxChange:function(e){
    // 复选框选中值会添加到数组中
    var text=e.detail.value;
    var weight="";
    var style="";
    var decoration="";
    for(var i=0;i<text.length;i++){
      switch(text[i]){
        case "isBold":
          weight="bold";
          break;
        case "isItalic":
          style="italic";
          break;
        case "isUnderline":
          decoration="underline";
          break;
      }
    }
    this.setData({
      weight:weight,
      style:style,
      decoration:decoration
    })
  }
})
